const App = {
    mixins: [Save],//配置文件，路径/utils/mixins.js
    data() {
        return {
            loading: false,
            dataForm: { Attachment_URL: '', Eligibility_Criteria: '' },
            childDataForm: [{}],
            childDataForm1: [{}],
            action: '',
            nodeKey: '',
            crop: [],
            project_policy_type: [],
            relativePath: '',
            showDialog: false,
            fileList: [],
        };
    },
    mounted() {
        this.getcrop();
    },
    watch: {
        childDataForm(val) {
            if (this.action == 'Modify') {
                let arr = []
                val.forEach(item => {
                    item.name = item.file_nameOriginal + "（磁盘文件名:" + item.file_name + "）"

                    if (item.Row_Status == '0') {
                        arr.push(item)
                    }

                })
                this.fileList = arr;

            }
        },
    },
    methods: {
        handlepreview(row) {
            this.fileUrl = photo + row.file_name;
            this.showDialog = true;
        },
        getcrop() {
            $.ajax({
                headers: requestHeaders(),
                url: `${mh}/generalBusiness/generalQueryByTableName`,
                method: "post",
                data: {
                    Data: 'project_policy_type',
                    Condition: `Row_Status='0'`,
                },
                success: (res) => {
                    this.project_policy_type = res;
                }, complete: (XMLHttpRequest) => {
                    requestPretreatment(XMLHttpRequest);
                },
            });
        },
        goBack() {
            window.history.back();
        },
    },
};
const { createApp, ref } = Vue;
const app = createApp(App);
app.use(ElementPlus, { locale: zhCn });
//这种方式是引入全部图标，无需单个引入
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}
app.component('yl-online-preview', ylOnlinePreview);
app.component('yl-upload', ylUpload);
const ElMessage = ElementPlus.ElMessage;
app.mount("#app");
